<include file="SpStore:header" />
		<!----《/头部结束》----->
		<div class="ncsc-layout wrapper">
<include file="SpStore:activity_left" />


  
  <div id="layoutRight" class="ncsc-layout-right">
    <div class="ncsc-path"><i class="icon-desktop"></i>商家管理中心<i class="icon-angle-right"></i>促销<i class="icon-angle-right"></i>限时折扣</div>
    <div class="main-content" id="mainContent">
      <div class="tabmenu">
  <ul class="tab pngFix">
  <li class="normal"><a href="/store/shop_xianshi.html">商城活动</a></li><li class="active"><a href="">我参与的活动</a></li></ul>
  <a class="ncsc-btn ncsc-btn-green" href="/store/xianshi_add.html">添加活动</a>

</div>

<div class="alert alert-block mt10">
  <ul>
    <li>1、点击申请活动按钮可以参加限时折扣活动，点击管理按钮可以对限时折扣活动内的商品进行管理</li>

 </ul>
</div>

<form method="get">
  <table class="search-form">
    <input type="hidden" name="act" value="store_promotion_xianshi">
    <input type="hidden" name="op" value="xianshi_list">
    <tbody><tr>
      <td>&nbsp;</td>
      <th>状态</th>
      <td class="w100"><select name="state">
                              <option value="0" selected="">全部</option>
                    <option value="1">正常</option>
                    <option value="2">已结束</option>
                    <option value="3">管理员关闭</option>
                            </select></td>
      <th class="w110">活动名称</th>
      <td class="w160"><input type="text" class="text w150" name="xianshi_name" value=""></td>
      <td class="w70 tc"><label class="submit-border"><input type="submit" class="submit" value="搜索"></label></td>
    </tr>
  </tbody></table>
</form>
<table class="ncsc-default-table">
  <thead>
    <tr>
      <th class="w30"></th>
      <th class="tl">商城活动名称</th>
      <th class="w180">开始时间</th>
      <th class="w180">结束时间</th>
      <th class="w80">购买下限</th>
      <th class="w80">状态</th>
      <th class="w150">操作</th>
    </tr>
  </thead>
	<foreach name="list" item="vo">
      <tbody data-type="xianshi_list" > 
		<tr class="bd-line">
		  <td></td>
		  <td class="tl">	
			<dl class="goods-name">
			  <dt>
				{$vo.xianshi_name}
			  </dt>
			</dl>
		  </td>
		  <td class="goods-time">{$vo.start_time|=date('Y-m-d h:i:s',###)}</td>
		  <td class="goods-time">{$vo.end_time|=date('Y-m-d h:i:s',###)}</td>
		  <td>
		  <if condition="$vo.lower_limit eq '0'" > 
		  不限
		  <else/>
		  {$vo.lower_limit}
		  </if>
		  
		  </td>
		  <td>
		  <in name="vo.state" value="0"> 
		  管理员关闭
		  </in>
		  <in name="vo.state" value="1"> 
		  正常
		  </in>
		  </td>
		  <td class="nscs-table-handle tr" >
				<in name="vo.xianshi_type" value="1,2">
				<span>
					  <a href="/store/g_xianshi.html?xianshi_id={$vo.xianshi_id}" class="btn-green">
						  <i class="icon-edit"></i>
						  <p >详情</p>
					  </a>
				</span>
				 </in>
			<span>
				<in name="vo.p_state" value="0">
				<a href="" style="color:#27A9E3;">
					<p >审核中</p>				
				</a>
				</in>
				<in name="vo.p_state" value="2">
				<a href="" style="color:red;">
					<p >不通过</p>				
				</a>
				</in>
				<in name="vo.p_state" value="3">
				<a href="" style="color:red;">
					<p >被管理员踢出活动</p>				
				</a>
				</in>
				<in name="vo.p_state" value="1">
				  <a href="/store/g_xianshi.html?xianshi_id={$vo.xianshi_id}" class="btn-green">
					  <i class="icon-cog"></i>
					  <p >产品</p>
				  </a>
				 </in>			 
			  </span>
				<in name="vo.xianshi_type" value="3">
				<span>
				  <a href="javascript:;" class="btn-green" data-xianshi-id="{$vo.xianshi_id}" nctype="btn_del_xianshi">
					  <i class="icon-cog"></i>
					  <p >删除</p>
				  </a>
				  </span>
				 </in>	
		  </td>
	  </tr>
    </tbody>
	</foreach>

	  
	  
  <tfoot>
        <tr>
      <td colspan="20"><div class="pagination">
		<ul>		
			{$page}
		</ul>	  
	  </div></td>
    </tr>
      </tfoot>
</table>
<form id="submit_form" action="" method="post">
  <input type="hidden" id="xianshi_id" name="xianshi_id" value="">
</form>
<script type="text/javascript">
    $(document).ready(function(){
        $('[nctype="btn_del_xianshi"]').on('click', function() {
			var id = $(this).attr('data-xianshi-id') ;
			//alert(id);
            if(confirm('您确定要删除吗?')) {
				$.ajax({
					url:"{:U('store/xianshi_del')}",
					data:{id:id,type:'xianshi_del'},
					type:'post',
					dataType:'json',
					success:function (e) {			
					
						alert(e.info); 
						location.reload();				
					}
				});					
            } else {
				return false;
			}
        });
    });
</script>
    </div>
  </div>
</div>
<script type="text/javascript">
</script>
			<!--底部-->

<include file="SpStore:footer" />
	</body>

</html>